Socket
Socket
Sign inDemoInstall

error-stack-parser

Package Overview
Dependencies
Maintainers
5
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-stack-parser

Extract meaning from JS Errors


Version published
Weekly downloads
6.7M
decreased by-42.42%
Maintainers
5
Weekly downloads
 
Created

What is error-stack-parser?

The error-stack-parser package is a utility for parsing and extracting information from JavaScript Error stacks. It provides a structured way to interpret error stack strings, making it easier to programmatically analyze errors, log them in a more readable format, or display them in user interfaces. It's particularly useful in applications where understanding the context and source of an error is crucial for debugging or error handling.

What are error-stack-parser's main functionalities?

Parsing Error Stacks

This feature allows you to parse the stack property of Error objects into a more structured format. Each element in the returned array represents a frame in the stack trace, with properties such as the function name, file name, line number, and column number. This makes it easier to analyze and display error information programmatically.

const ErrorStackParser = require('error-stack-parser');
const error = new Error('This is a test error');
const stackFrames = ErrorStackParser.parse(error);
console.log(stackFrames);

Other packages similar to error-stack-parser

Keywords

FAQs

Package last updated on 06 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc